/**
 * 熊猫直播间初始化
 * @param page
 * @param sleep
 * @returns {Promise<void>}
 */
module.exports = async ({page, sleep}) => {
    await page.addStyleTag({
        content: `
        #topbar,
        #Create_Layer,
        div.top-radio-player,
        div.ya-gift-layer,
        #live-footer-tabs
            {display: none !important;}
        
        div.live-player
            {display: inherit !important;}
        `
    });
    await page.evaluate(() => {
        const $player = document.querySelector('.stage-container.stage-container-head');
        if ($player)
            window.scrollTo(0, $player.getBoundingClientRect().y);
    });
    await sleep(8000);
};